3.2.38 \(\int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^n \, dx\) [138]

Optimal. Leaf size=172 \[ \frac {6 a^3 (c-c \sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a+a \sec (e+f x)}}+\frac {2 a^3 \, _2F_1\left (1,\frac {1}{2}+n;\frac {3}{2}+n;1-\sec (e+f x)\right ) (c-c \sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a+a \sec (e+f x)}}-\frac {2 a^3 (c-c \sec (e+f x))^{1+n} \tan (e+f x)}{c f (3+2 n) \sqrt {a+a \sec (e+f x)}} \]

[Out]

6*a^3*(c-c*sec(f*x+e))^n*tan(f*x+e)/f/(1+2*n)/(a+a*sec(f*x+e))^(1/2)+2*a^3*hypergeom([1, 1/2+n],[3/2+n],1-sec(
f*x+e))*(c-c*sec(f*x+e))^n*tan(f*x+e)/f/(1+2*n)/(a+a*sec(f*x+e))^(1/2)-2*a^3*(c-c*sec(f*x+e))^(1+n)*tan(f*x+e)
/c/f/(3+2*n)/(a+a*sec(f*x+e))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3997, 90, 67} \begin {gather*} \frac {2 a^3 \tan (e+f x) (c-c \sec (e+f x))^n \, _2F_1\left (1,n+\frac {1}{2};n+\frac {3}{2};1-\sec (e+f x)\right )}{f (2 n+1) \sqrt {a \sec (e+f x)+a}}+\frac {6 a^3 \tan (e+f x) (c-c \sec (e+f x))^n}{f (2 n+1) \sqrt {a \sec (e+f x)+a}}-\frac {2 a^3 \tan (e+f x) (c-c \sec (e+f x))^{n+1}}{c f (2 n+3) \sqrt {a \sec (e+f x)+a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^n,x]

[Out]

(6*a^3*(c - c*Sec[e + f*x])^n*Tan[e + f*x])/(f*(1 + 2*n)*Sqrt[a + a*Sec[e + f*x]]) + (2*a^3*Hypergeometric2F1[
1, 1/2 + n, 3/2 + n, 1 - Sec[e + f*x]]*(c - c*Sec[e + f*x])^n*Tan[e + f*x])/(f*(1 + 2*n)*Sqrt[a + a*Sec[e + f*
x]]) - (2*a^3*(c - c*Sec[e + f*x])^(1 + n)*Tan[e + f*x])/(c*f*(3 + 2*n)*Sqrt[a + a*Sec[e + f*x]])

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 3997

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Di
st[a*c*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[c + d*Csc[e + f*x]])), Subst[Int[(a + b*x)^(m - 1/2)*((c
 + d*x)^(n - 1/2)/x), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && EqQ[b*c + a*d, 0] && E
qQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^n \, dx &=-\frac {(a c \tan (e+f x)) \text {Subst}\left (\int \frac {(a+a x)^2 (c-c x)^{-\frac {1}{2}+n}}{x} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=-\frac {(a c \tan (e+f x)) \text {Subst}\left (\int \left (3 a^2 (c-c x)^{-\frac {1}{2}+n}+\frac {a^2 (c-c x)^{-\frac {1}{2}+n}}{x}-\frac {a^2 (c-c x)^{\frac {1}{2}+n}}{c}\right ) \, dx,x,\sec (e+f x)\right )}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=\frac {6 a^3 (c-c \sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a+a \sec (e+f x)}}-\frac {2 a^3 (c-c \sec (e+f x))^{1+n} \tan (e+f x)}{c f (3+2 n) \sqrt {a+a \sec (e+f x)}}-\frac {\left (a^3 c \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(c-c x)^{-\frac {1}{2}+n}}{x} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=\frac {6 a^3 (c-c \sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a+a \sec (e+f x)}}+\frac {2 a^3 \, _2F_1\left (1,\frac {1}{2}+n;\frac {3}{2}+n;1-\sec (e+f x)\right ) (c-c \sec (e+f x))^n \tan (e+f x)}{f (1+2 n) \sqrt {a+a \sec (e+f x)}}-\frac {2 a^3 (c-c \sec (e+f x))^{1+n} \tan (e+f x)}{c f (3+2 n) \sqrt {a+a \sec (e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 3.52, size = 0, normalized size = 0.00 \begin {gather*} \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^n \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^n,x]

[Out]

Integrate[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^n, x]

________________________________________________________________________________________

Maple [F]
time = 0.17, size = 0, normalized size = 0.00 \[\int \left (a +a \sec \left (f x +e \right )\right )^{\frac {5}{2}} \left (c -c \sec \left (f x +e \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^n,x)

[Out]

int((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^n,x, algorithm="maxima")

[Out]

integrate((a*sec(f*x + e) + a)^(5/2)*(-c*sec(f*x + e) + c)^n, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^n,x, algorithm="fricas")

[Out]

integral((a^2*sec(f*x + e)^2 + 2*a^2*sec(f*x + e) + a^2)*sqrt(a*sec(f*x + e) + a)*(-c*sec(f*x + e) + c)^n, x)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))**(5/2)*(c-c*sec(f*x+e))**n,x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 6190 deep

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((a*sec(f*x + e) + a)^(5/2)*(-c*sec(f*x + e) + c)^n, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x))^n,x)

[Out]

int((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x))^n, x)

________________________________________________________________________________________